Skip to content

Commit

Permalink
Add gitignore and fix PublishingMetadata
Browse files Browse the repository at this point in the history
This commit includes the .gitignore file as well as add missing
common attributes on PublishingMetadata.
  • Loading branch information
JAVGan committed Jan 6, 2023
1 parent 3a834be commit 364fe8f
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 1 deletion.
107 changes: 107 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# PyCharm
.idea/
11 changes: 10 additions & 1 deletion cloudpub/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,25 @@ class PublishingMetadata:
Args:
image_path (str)
The image URL or ID to be associated with a product listing
architecture (str)
The VM Image architecture
destination (str)
The product listing to update with the given ``image_path``
overwrite (bool)
Whether to overwrite the product listing with the given image or not (append only).
keepdraft (bool):
Whether to just associate the VM Image with the destination but avoid publishing or not.
When set to ``False`` it will publish the content as GA.
"""

def __init__(self, image_path: str, destination: str, overwrite: bool) -> None:
def __init__(
self, image_path: str, architecture: str, destination: str, overwrite: bool, keepdraft: bool
) -> None:
self.image_path = image_path
self.architecture = architecture
self.destination = destination
self.overwrite = overwrite
self.keepdraft = keepdraft


class BaseService(ABCMeta):
Expand Down

0 comments on commit 364fe8f

Please sign in to comment.