akamai / cli-cloudlets

Akamai CLI for Cloudlets allows you to work with cloudlets from the Command Line
Apache License 2.0
3 stars 9 forks source link

Cloudlets and SSL certs #19

Closed Firenzzz closed 7 months ago

Firenzzz commented 11 months ago

Dear Akamai team,

At the company I work they intercept our SSL comms. I didn't have a problem with GTM and Purge modules so far, but Cloudlets throw an SSL error for obvious reasons. Can you add an option to ignore that?

Also, can we have CSV support for ER policies?

Thank you!

pwongcha commented 11 months ago

Could you please provide OS and command to replicate?

Firenzzz commented 11 months ago

I'm on a Mac and installed Akamai CLI with brew, then installed cloudlets with akamai install cloudlets. The command is akamai --proxy http://fqdn_of_the_proxy:80 cloudlets -e .edgerc_myself_restricted -s default list

This is the result I'm getting.

...fetching policy list
Traceback (most recent call last):
  File "/Users/username/.akamai-cli/venv/cli-cloudlets/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 3802, in get_loc
    return self._engine.get_loc(casted_key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/index.pyx", line 146, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/index_class_helper.pxi", line 49, in pandas._libs.index.Int64Engine._check_type
KeyError: 'modifiedDate'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/username/.akamai-cli/src/cli-cloudlets/bin/akamai-cloudlets.py", line 1434, in <module>
    cli_status = cli(prog_name='akamai cloudlets')
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/.akamai-cli/venv/cli-cloudlets/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/.akamai-cli/venv/cli-cloudlets/lib/python3.11/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/username/.akamai-cli/venv/cli-cloudlets/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/.akamai-cli/venv/cli-cloudlets/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/.akamai-cli/venv/cli-cloudlets/lib/python3.11/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/.akamai-cli/venv/cli-cloudlets/lib/python3.11/site-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/.akamai-cli/venv/cli-cloudlets/lib/python3.11/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/.akamai-cli/src/cli-cloudlets/bin/akamai-cloudlets.py", line 223, in list
    shared_df['lastModifiedDate'] = shared_df['modifiedDate'].apply(utility_object.convert_datetime_format)
                                    ~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/Users/username/.akamai-cli/venv/cli-cloudlets/lib/python3.11/site-packages/pandas/core/frame.py", line 3807, in __getitem__
    indexer = self.columns.get_loc(key)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/.akamai-cli/venv/cli-cloudlets/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 3804, in get_loc
    raise KeyError(key) from err
KeyError: 'modifiedDate'

Whereas GTM and Purge modules work fine.

Also, before answering I tried installing this module on Debian 11 and 12 to see if it's a MacOS problem maybe, and it just doesn't install, regardless of whether I try to casually run akamai install cloudlets or follow the steps from the bottom of readme (local install).

firenz@naos:~$ akamai install file:///home/firenz/cli-cloudlets
Attempting to fetch command from file:///home/firenz/cli-cloudlets... [OK]
Disclaimer: You are installing a third-party package, subject to its own terms and conditions. Akamai makes no warranty or represeInstalling... [          ] ERROR[0017] failed to run pip install --upgrade --ignore-installed -r requirements.txt command=install
 ERROR[0017] Collecting chardet==3.0.4
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting click==8.1.3
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting edgegrid-python==1.2.1
  Using cached edgegrid_python-1.2.1-py3-none-any.whl (16 kB)
Collecting flake8==6.1.0
  Using cached flake8-6.1.0-py2.py3-none-any.whl (58 kB)
Collecting openpyxl==3.1.2
  Using cached openpyxl-3.1.2-py2.py3-none-any.whl (249 kB)
Collecting pandas==1.5.3
  Using cached pandas-1.5.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)
Collecting pre-commit==3.3.3
  Using cached pre_commit-3.3.3-py2.py3-none-any.whl (202 kB)
Collecting prettytable==0.7.2
  Using cached prettytable-0.7.2.zip (28 kB)
Collecting requests<3.0,>=2.25.1
  Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Collecting rich==13.3.3
  Using cached rich-13.3.3-py3-none-any.whl (238 kB)
Collecting tabulate==0.9.0
  Using cached tabulate-0.9.0-py3-none-any.whl (35 kB)
Collecting urllib3==1.26.18
  Using cached urllib3-1.26.18-py2.py3-none-any.whl (143 kB)
Collecting xlsxwriter==3.0.9
  Using cached XlsxWriter-3.0.9-py3-none-any.whl (152 kB)
Collecting pyasn1
  Using cached pyasn1-0.5.0-py2.py3-none-any.whl (83 kB)
Collecting ndg-httpsclient
  Using cached ndg_httpsclient-0.5.1-py3-none-any.whl (34 kB)
Collecting pyOpenSSL>=19.0.0
  Using cached pyOpenSSL-23.3.0-py3-none-any.whl (58 kB)
Collecting pycodestyle<2.12.0,>=2.11.0
  Using cached pycodestyle-2.11.1-py2.py3-none-any.whl (31 kB)
Collecting pyflakes<3.2.0,>=3.1.0
  Using cached pyflakes-3.1.0-py2.py3-none-any.whl (62 kB)
Collecting mccabe<0.8.0,>=0.7.0
  Using cached mccabe-0.7.0-py2.py3-none-any.whl (7.3 kB)
Collecting et-xmlfile
  Using cached et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Collecting python-dateutil>=2.8.1
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting numpy>=1.20.3
  Using cached numpy-1.26.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
Collecting pytz>=2020.1
  Using cached pytz-2023.3.post1-py2.py3-none-any.whl (502 kB)
Collecting pyyaml>=5.1
  Using cached PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (738 kB)
Collecting virtualenv>=20.10.0
  Using cached virtualenv-20.24.6-py3-none-any.whl (3.8 MB)
Collecting nodeenv>=0.11.1
  Using cached nodeenv-1.8.0-py2.py3-none-any.whl (22 kB)
Collecting cfgv>=2.0.0
  Using cached cfgv-3.4.0-py2.py3-none-any.whl (7.2 kB)
Collecting identify>=1.0.0
  Using cached identify-2.5.31-py2.py3-none-any.whl (98 kB)
Collecting pygments<3.0.0,>=2.13.0
  Using cached Pygments-2.16.1-py3-none-any.whl (1.2 MB)
Collecting markdown-it-py<3.0.0,>=2.2.0
  Using cached markdown_it_py-2.2.0-py3-none-any.whl (84 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2023.7.22-py3-none-any.whl (158 kB)
Collecting charset-normalizer<4,>=2
  Using cached charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB)
Collecting mdurl~=0.1
  Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Collecting setuptools
  Using cached setuptools-68.2.2-py3-none-any.whl (807 kB)
Collecting cryptography<42,>=41.0.5
  Using cached cryptography-41.0.5-cp37-abi3-manylinux_2_28_x86_64.whl (4.4 MB)
Collecting cffi>=1.12
  Using cached cffi-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (443 kB)
Collecting pycparser
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting platformdirs<4,>=3.9.1
  Using cached platformdirs-3.11.0-py3-none-any.whl (17 kB)
Collecting filelock<4,>=3.12.2
  Using cached filelock-3.13.1-py3-none-any.whl (11 kB)
Collecting distlib<1,>=0.3.7
  Using cached distlib-0.3.7-py2.py3-none-any.whl (468 kB)
Using legacy 'setup.py install' for prettytable, since package 'wheel' is not installed.
Installing collected packages: pycparser, cffi, cryptography, urllib3, six, setuptools, pyOpenSSL, pyasn1, platformdirs, mdurl, idna, filelock, distlib, charset-normalizer, certifi, virtualenv, requests, pyyaml, pytz, python-dateutil, pygments, pyflakes, pycodestyle, numpy, nodeenv, ndg-httpsclient, mccabe, markdown-it-py, identify, et-xmlfile, cfgv, xlsxwriter, tabulate, rich, prettytable, pre-commit, pandas, openpyxl, flake8, edgegrid-python, click, chardet
    Running setup.py install for prettytable: started
    Running setup.py install for prettytable: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /home/firenz/.akamai-cli/venv/cli-cloudlets/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v2vr4lyp/install-record.txt --single-version-externally-managed --compile --install-headers /home/firenz/.akamai-cli/venv/cli-cloudlets/include/site/python3.9/prettytable
         cwd: /tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/
    Complete output (19 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py", line 5, in <module>
        setup(
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/__init__.py", line 103, in setup
        return distutils.core.setup(**attrs)
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 147, in setup
        _setup_distribution = dist = klass(attrs)
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/dist.py", line 303, in __init__
        _Distribution.__init__(self, dist_attrs)
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
        self.finalize_options()
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/dist.py", line 679, in finalize_options
        for ep in sorted(loaded, key=by_order):
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/dist.py", line 678, in <lambda>
        loaded = map(lambda e: e.load(), filtered)
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 210, in load
        return functools.reduce(getattr, attrs, module)
    AttributeError: type object 'Distribution' has no attribute '_finalize_feature_opts'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/firenz/.akamai-cli/venv/cli-cloudlets/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v2vr4lyp/install-record.txt --single-version-externally-managed --compile --install-headers /home/firenz/.akamai-cli/venv/cli-cloudlets/include/site/python3.9/prettytable Check the logs for full command output.
 command=install
 ERROR[0017] failed to install required python packages from requirements.txt: Collecting chardet==3.0.4
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting click==8.1.3
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting edgegrid-python==1.2.1
  Using cached edgegrid_python-1.2.1-py3-none-any.whl (16 kB)
Collecting flake8==6.1.0
  Using cached flake8-6.1.0-py2.py3-none-any.whl (58 kB)
Collecting openpyxl==3.1.2
  Using cached openpyxl-3.1.2-py2.py3-none-any.whl (249 kB)
Collecting pandas==1.5.3
  Using cached pandas-1.5.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)
Collecting pre-commit==3.3.3
  Using cached pre_commit-3.3.3-py2.py3-none-any.whl (202 kB)
Collecting prettytable==0.7.2
  Using cached prettytable-0.7.2.zip (28 kB)
Collecting requests<3.0,>=2.25.1
  Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Collecting rich==13.3.3
  Using cached rich-13.3.3-py3-none-any.whl (238 kB)
Collecting tabulate==0.9.0
  Using cached tabulate-0.9.0-py3-none-any.whl (35 kB)
Collecting urllib3==1.26.18
  Using cached urllib3-1.26.18-py2.py3-none-any.whl (143 kB)
Collecting xlsxwriter==3.0.9
  Using cached XlsxWriter-3.0.9-py3-none-any.whl (152 kB)
Collecting pyasn1
  Using cached pyasn1-0.5.0-py2.py3-none-any.whl (83 kB)
Collecting ndg-httpsclient
  Using cached ndg_httpsclient-0.5.1-py3-none-any.whl (34 kB)
Collecting pyOpenSSL>=19.0.0
  Using cached pyOpenSSL-23.3.0-py3-none-any.whl (58 kB)
Collecting pycodestyle<2.12.0,>=2.11.0
  Using cached pycodestyle-2.11.1-py2.py3-none-any.whl (31 kB)
Collecting pyflakes<3.2.0,>=3.1.0
  Using cached pyflakes-3.1.0-py2.py3-none-any.whl (62 kB)
Collecting mccabe<0.8.0,>=0.7.0
  Using cached mccabe-0.7.0-py2.py3-none-any.whl (7.3 kB)
Collecting et-xmlfile
  Using cached et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Collecting python-dateutil>=2.8.1
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting numpy>=1.20.3
  Using cached numpy-1.26.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
Collecting pytz>=2020.1
  Using cached pytz-2023.3.post1-py2.py3-none-any.whl (502 kB)
Collecting pyyaml>=5.1
  Using cached PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (738 kB)
Collecting virtualenv>=20.10.0
  Using cached virtualenv-20.24.6-py3-none-any.whl (3.8 MB)
Collecting nodeenv>=0.11.1
  Using cached nodeenv-1.8.0-py2.py3-none-any.whl (22 kB)
Collecting cfgv>=2.0.0
  Using cached cfgv-3.4.0-py2.py3-none-any.whl (7.2 kB)
Collecting identify>=1.0.0
  Using cached identify-2.5.31-py2.py3-none-any.whl (98 kB)
Collecting pygments<3.0.0,>=2.13.0
  Using cached Pygments-2.16.1-py3-none-any.whl (1.2 MB)
Collecting markdown-it-py<3.0.0,>=2.2.0
  Using cached markdown_it_py-2.2.0-py3-none-any.whl (84 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2023.7.22-py3-none-any.whl (158 kB)
Collecting charset-normalizer<4,>=2
  Using cached charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB)
Collecting mdurl~=0.1
  Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Collecting setuptools
  Using cached setuptools-68.2.2-py3-none-any.whl (807 kB)
Collecting cryptography<42,>=41.0.5
  Using cached cryptography-41.0.5-cp37-abi3-manylinux_2_28_x86_64.whl (4.4 MB)
Collecting cffi>=1.12
  Using cached cffi-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (443 kB)
Collecting pycparser
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting platformdirs<4,>=3.9.1
  Using cached platformdirs-3.11.0-py3-none-any.whl (17 kB)
Collecting filelock<4,>=3.12.2
  Using cached filelock-3.13.1-py3-none-any.whl (11 kB)
Collecting distlib<1,>=0.3.7
  Using cached distlib-0.3.7-py2.py3-none-any.whl (468 kB)
Using legacy 'setup.py install' for prettytable, since package 'wheel' is not installed.
Installing collected packages: pycparser, cffi, cryptography, urllib3, six, setuptools, pyOpenSSL, pyasn1, platformdirs, mdurl, idna, filelock, distlib, charset-normalizer, certifi, virtualenv, requests, pyyaml, pytz, python-dateutil, pygments, pyflakes, pycodestyle, numpy, nodeenv, ndg-httpsclient, mccabe, markdown-it-py, identify, et-xmlfile, cfgv, xlsxwriter, tabulate, rich, prettytable, pre-commit, pandas, openpyxl, flake8, edgegrid-python, click, chardet
    Running setup.py install for prettytable: started
    Running setup.py install for prettytable: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /home/firenz/.akamai-cli/venv/cli-cloudlets/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v2vr4lyp/install-record.txt --single-version-externally-managed --compile --install-headers /home/firenz/.akamai-cli/venv/cli-cloudlets/include/site/python3.9/prettytable
         cwd: /tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/
    Complete output (19 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py", line 5, in <module>
        setup(
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/__init__.py", line 103, in setup
        return distutils.core.setup(**attrs)
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 147, in setup
        _setup_distribution = dist = klass(attrs)
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/dist.py", line 303, in __init__
        _Distribution.__init__(self, dist_attrs)
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
        self.finalize_options()
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/dist.py", line 679, in finalize_options
        for ep in sorted(loaded, key=by_order):
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/dist.py", line 678, in <lambda>
        loaded = map(lambda e: e.load(), filtered)
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 210, in load
        return functools.reduce(getattr, attrs, module)
    AttributeError: type object 'Distribution' has no attribute '_finalize_feature_opts'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/firenz/.akamai-cli/venv/cli-cloudlets/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v2vr4lyp/install-record.txt --single-version-externally-managed --compile --install-headers /home/firenz/.akamai-cli/venv/cli-cloudlets/include/site/python3.9/prettytable Check the logs for full command output.
 command=install
Installing... [FAIL]
failed to install required python packages from requirements.txt: Collecting chardet==3.0.4
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting click==8.1.3
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting edgegrid-python==1.2.1
  Using cached edgegrid_python-1.2.1-py3-none-any.whl (16 kB)
Collecting flake8==6.1.0
  Using cached flake8-6.1.0-py2.py3-none-any.whl (58 kB)
Collecting openpyxl==3.1.2
  Using cached openpyxl-3.1.2-py2.py3-none-any.whl (249 kB)
Collecting pandas==1.5.3
  Using cached pandas-1.5.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)
Collecting pre-commit==3.3.3
  Using cached pre_commit-3.3.3-py2.py3-none-any.whl (202 kB)
Collecting prettytable==0.7.2
  Using cached prettytable-0.7.2.zip (28 kB)
Collecting requests<3.0,>=2.25.1
  Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Collecting rich==13.3.3
  Using cached rich-13.3.3-py3-none-any.whl (238 kB)
Collecting tabulate==0.9.0
  Using cached tabulate-0.9.0-py3-none-any.whl (35 kB)
Collecting urllib3==1.26.18
  Using cached urllib3-1.26.18-py2.py3-none-any.whl (143 kB)
Collecting xlsxwriter==3.0.9
  Using cached XlsxWriter-3.0.9-py3-none-any.whl (152 kB)
Collecting pyasn1
  Using cached pyasn1-0.5.0-py2.py3-none-any.whl (83 kB)
Collecting ndg-httpsclient
  Using cached ndg_httpsclient-0.5.1-py3-none-any.whl (34 kB)
Collecting pyOpenSSL>=19.0.0
  Using cached pyOpenSSL-23.3.0-py3-none-any.whl (58 kB)
Collecting pycodestyle<2.12.0,>=2.11.0
  Using cached pycodestyle-2.11.1-py2.py3-none-any.whl (31 kB)
Collecting pyflakes<3.2.0,>=3.1.0
  Using cached pyflakes-3.1.0-py2.py3-none-any.whl (62 kB)
Collecting mccabe<0.8.0,>=0.7.0
  Using cached mccabe-0.7.0-py2.py3-none-any.whl (7.3 kB)
Collecting et-xmlfile
  Using cached et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Collecting python-dateutil>=2.8.1
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting numpy>=1.20.3
  Using cached numpy-1.26.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
Collecting pytz>=2020.1
  Using cached pytz-2023.3.post1-py2.py3-none-any.whl (502 kB)
Collecting pyyaml>=5.1
  Using cached PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (738 kB)
Collecting virtualenv>=20.10.0
  Using cached virtualenv-20.24.6-py3-none-any.whl (3.8 MB)
Collecting nodeenv>=0.11.1
  Using cached nodeenv-1.8.0-py2.py3-none-any.whl (22 kB)
Collecting cfgv>=2.0.0
  Using cached cfgv-3.4.0-py2.py3-none-any.whl (7.2 kB)
Collecting identify>=1.0.0
  Using cached identify-2.5.31-py2.py3-none-any.whl (98 kB)
Collecting pygments<3.0.0,>=2.13.0
  Using cached Pygments-2.16.1-py3-none-any.whl (1.2 MB)
Collecting markdown-it-py<3.0.0,>=2.2.0
  Using cached markdown_it_py-2.2.0-py3-none-any.whl (84 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2023.7.22-py3-none-any.whl (158 kB)
Collecting charset-normalizer<4,>=2
  Using cached charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB)
Collecting mdurl~=0.1
  Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Collecting setuptools
  Using cached setuptools-68.2.2-py3-none-any.whl (807 kB)
Collecting cryptography<42,>=41.0.5
  Using cached cryptography-41.0.5-cp37-abi3-manylinux_2_28_x86_64.whl (4.4 MB)
Collecting cffi>=1.12
  Using cached cffi-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (443 kB)
Collecting pycparser
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting platformdirs<4,>=3.9.1
  Using cached platformdirs-3.11.0-py3-none-any.whl (17 kB)
Collecting filelock<4,>=3.12.2
  Using cached filelock-3.13.1-py3-none-any.whl (11 kB)
Collecting distlib<1,>=0.3.7
  Using cached distlib-0.3.7-py2.py3-none-any.whl (468 kB)
Using legacy 'setup.py install' for prettytable, since package 'wheel' is not installed.
Installing collected packages: pycparser, cffi, cryptography, urllib3, six, setuptools, pyOpenSSL, pyasn1, platformdirs, mdurl, idna, filelock, distlib, charset-normalizer, certifi, virtualenv, requests, pyyaml, pytz, python-dateutil, pygments, pyflakes, pycodestyle, numpy, nodeenv, ndg-httpsclient, mccabe, markdown-it-py, identify, et-xmlfile, cfgv, xlsxwriter, tabulate, rich, prettytable, pre-commit, pandas, openpyxl, flake8, edgegrid-python, click, chardet
    Running setup.py install for prettytable: started
    Running setup.py install for prettytable: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /home/firenz/.akamai-cli/venv/cli-cloudlets/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v2vr4lyp/install-record.txt --single-version-externally-managed --compile --install-headers /home/firenz/.akamai-cli/venv/cli-cloudlets/include/site/python3.9/prettytable
         cwd: /tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/
    Complete output (19 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py", line 5, in <module>
        setup(
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/__init__.py", line 103, in setup
        return distutils.core.setup(**attrs)
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 147, in setup
        _setup_distribution = dist = klass(attrs)
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/dist.py", line 303, in __init__
        _Distribution.__init__(self, dist_attrs)
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
        self.finalize_options()
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/dist.py", line 679, in finalize_options
        for ep in sorted(loaded, key=by_order):
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/dist.py", line 678, in <lambda>
        loaded = map(lambda e: e.load(), filtered)
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 210, in load
        return functools.reduce(getattr, attrs, module)
    AttributeError: type object 'Distribution' has no attribute '_finalize_feature_opts'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/firenz/.akamai-cli/venv/cli-cloudlets/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v2vr4lyp/install-record.txt --single-version-externally-managed --compile --install-headers /home/firenz/.akamai-cli/venv/cli-cloudlets/include/site/python3.9/prettytable Check the logs for full command output.

 ERROR[0017] failed to install required python packages from requirements.txt: Collecting chardet==3.0.4
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting click==8.1.3
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting edgegrid-python==1.2.1
  Using cached edgegrid_python-1.2.1-py3-none-any.whl (16 kB)
Collecting flake8==6.1.0
  Using cached flake8-6.1.0-py2.py3-none-any.whl (58 kB)
Collecting openpyxl==3.1.2
  Using cached openpyxl-3.1.2-py2.py3-none-any.whl (249 kB)
Collecting pandas==1.5.3
  Using cached pandas-1.5.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)
Collecting pre-commit==3.3.3
  Using cached pre_commit-3.3.3-py2.py3-none-any.whl (202 kB)
Collecting prettytable==0.7.2
  Using cached prettytable-0.7.2.zip (28 kB)
Collecting requests<3.0,>=2.25.1
  Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Collecting rich==13.3.3
  Using cached rich-13.3.3-py3-none-any.whl (238 kB)
Collecting tabulate==0.9.0
  Using cached tabulate-0.9.0-py3-none-any.whl (35 kB)
Collecting urllib3==1.26.18
  Using cached urllib3-1.26.18-py2.py3-none-any.whl (143 kB)
Collecting xlsxwriter==3.0.9
  Using cached XlsxWriter-3.0.9-py3-none-any.whl (152 kB)
Collecting pyasn1
  Using cached pyasn1-0.5.0-py2.py3-none-any.whl (83 kB)
Collecting ndg-httpsclient
  Using cached ndg_httpsclient-0.5.1-py3-none-any.whl (34 kB)
Collecting pyOpenSSL>=19.0.0
  Using cached pyOpenSSL-23.3.0-py3-none-any.whl (58 kB)
Collecting pycodestyle<2.12.0,>=2.11.0
  Using cached pycodestyle-2.11.1-py2.py3-none-any.whl (31 kB)
Collecting pyflakes<3.2.0,>=3.1.0
  Using cached pyflakes-3.1.0-py2.py3-none-any.whl (62 kB)
Collecting mccabe<0.8.0,>=0.7.0
  Using cached mccabe-0.7.0-py2.py3-none-any.whl (7.3 kB)
Collecting et-xmlfile
  Using cached et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Collecting python-dateutil>=2.8.1
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting numpy>=1.20.3
  Using cached numpy-1.26.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
Collecting pytz>=2020.1
  Using cached pytz-2023.3.post1-py2.py3-none-any.whl (502 kB)
Collecting pyyaml>=5.1
  Using cached PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (738 kB)
Collecting virtualenv>=20.10.0
  Using cached virtualenv-20.24.6-py3-none-any.whl (3.8 MB)
Collecting nodeenv>=0.11.1
  Using cached nodeenv-1.8.0-py2.py3-none-any.whl (22 kB)
Collecting cfgv>=2.0.0
  Using cached cfgv-3.4.0-py2.py3-none-any.whl (7.2 kB)
Collecting identify>=1.0.0
  Using cached identify-2.5.31-py2.py3-none-any.whl (98 kB)
Collecting pygments<3.0.0,>=2.13.0
  Using cached Pygments-2.16.1-py3-none-any.whl (1.2 MB)
Collecting markdown-it-py<3.0.0,>=2.2.0
  Using cached markdown_it_py-2.2.0-py3-none-any.whl (84 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2023.7.22-py3-none-any.whl (158 kB)
Collecting charset-normalizer<4,>=2
  Using cached charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB)
Collecting mdurl~=0.1
  Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Collecting setuptools
  Using cached setuptools-68.2.2-py3-none-any.whl (807 kB)
Collecting cryptography<42,>=41.0.5
  Using cached cryptography-41.0.5-cp37-abi3-manylinux_2_28_x86_64.whl (4.4 MB)
Collecting cffi>=1.12
  Using cached cffi-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (443 kB)
Collecting pycparser
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting platformdirs<4,>=3.9.1
  Using cached platformdirs-3.11.0-py3-none-any.whl (17 kB)
Collecting filelock<4,>=3.12.2
  Using cached filelock-3.13.1-py3-none-any.whl (11 kB)
Collecting distlib<1,>=0.3.7
  Using cached distlib-0.3.7-py2.py3-none-any.whl (468 kB)
Using legacy 'setup.py install' for prettytable, since package 'wheel' is not installed.
Installing collected packages: pycparser, cffi, cryptography, urllib3, six, setuptools, pyOpenSSL, pyasn1, platformdirs, mdurl, idna, filelock, distlib, charset-normalizer, certifi, virtualenv, requests, pyyaml, pytz, python-dateutil, pygments, pyflakes, pycodestyle, numpy, nodeenv, ndg-httpsclient, mccabe, markdown-it-py, identify, et-xmlfile, cfgv, xlsxwriter, tabulate, rich, prettytable, pre-commit, pandas, openpyxl, flake8, edgegrid-python, click, chardet
    Running setup.py install for prettytable: started
    Running setup.py install for prettytable: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /home/firenz/.akamai-cli/venv/cli-cloudlets/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v2vr4lyp/install-record.txt --single-version-externally-managed --compile --install-headers /home/firenz/.akamai-cli/venv/cli-cloudlets/include/site/python3.9/prettytable
         cwd: /tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/
    Complete output (19 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py", line 5, in <module>
        setup(
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/__init__.py", line 103, in setup
        return distutils.core.setup(**attrs)
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 147, in setup
        _setup_distribution = dist = klass(attrs)
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/dist.py", line 303, in __init__
        _Distribution.__init__(self, dist_attrs)
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
        self.finalize_options()
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/dist.py", line 679, in finalize_options
        for ep in sorted(loaded, key=by_order):
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/dist.py", line 678, in <lambda>
        loaded = map(lambda e: e.load(), filtered)
      File "/home/firenz/.akamai-cli/venv/cli-cloudlets/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 210, in load
        return functools.reduce(getattr, attrs, module)
    AttributeError: type object 'Distribution' has no attribute '_finalize_feature_opts'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/firenz/.akamai-cli/venv/cli-cloudlets/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2hevdkoq/prettytable_3c19ea6b12fa4663ae298bfddd872a28/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v2vr4lyp/install-record.txt --single-version-externally-managed --compile --install-headers /home/firenz/.akamai-cli/venv/cli-cloudlets/include/site/python3.9/prettytable Check the logs for full command output.
 command=install
 ERROR[0017] INSTALL ERROR: Unable to install selected package command=install
Unable to install selected package
pwongcha commented 11 months ago

Thank you for the completed stack trace.

pwongcha commented 11 months ago

For the CSV upload functionality, it's available on the portal. Have you tried that? https://techdocs.akamai.com/cloudlets/docs/dl-rules-csv-format update_rules

Will this meet you need, or you still need to have it's loadable via CLI?

Firenzzz commented 11 months ago

The point is not to use Luna 😄 I can live without csv support in cli, that was the initial requirement, but I can wave a hand on this and live with jsons. Can you give me hint on those installation problems?

pwongcha commented 11 months ago

understood about using Akamai Control Center (or Luna) the PR to upgrade edgegrid-python and urllib3 were merged input main/master on Friday. Do you still have issue with proxy?

Firenzzz commented 10 months ago

Can't test it at the moment. It doesn't install on python lower than 3.9, so I need to find a workaround for this or just use httpie/egcurl.