Skip to content

Commit

Permalink
Adding ArmImage community builder (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
codexlynx authored and mayn committed Jan 31, 2019
1 parent 44a4301 commit 300b9c2
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/packerlicious/community/builder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"""
Copyright 2018 Matthew Aynalem
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

from ..builder import PackerBuilder


class ArmImage(PackerBuilder):
"""
ARM Builder
https://github.com/solo-io/packer-builder-arm-image
"""
resource_type = "arm-image"

props = {
'iso_url': (str, True),
'iso_checksum_type': (str, True),
'iso_checksum': (str, True),
'last_partition_extra_size': (int, False)
}
13 changes: 13 additions & 0 deletions tests/packerlicious/community/test_builder_arm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import pytest

import packerlicious.community.builder as builder


class TestArmImageBuilder(object):

def test_required_fields_missing(self):
b = builder.ArmImage()

with pytest.raises(ValueError) as excinfo:
b.to_dict()
assert 'required' in str(excinfo.value)

0 comments on commit 300b9c2

Please sign in to comment.