Skip to content

Commit

Permalink
Merge pull request #141 from paulaCrismaru/packet
Browse files Browse the repository at this point in the history
Adds test for Packet
  • Loading branch information
ader1990 committed Jul 24, 2017
2 parents ee914c8 + c08865a commit 00b5e99
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions argus/config_generator/windows/cb_init.py
Expand Up @@ -36,6 +36,7 @@ class BasePopulatedCBInitConfig(base.BaseWindowsConfig):
util.CLOUD_STACK_SERVICE: "cloudstack.CloudStack",
util.MAAS_SERVICE: "maasservice.MaaSHttpService",
util.NO_SERVICE: "",
util.PACKET_SERVICE: "packet.PacketService"
}

def __init__(self, client):
Expand Down
37 changes: 37 additions & 0 deletions argus/recipes/cloud/windows.py
Expand Up @@ -831,3 +831,40 @@ def prepare_cbinit_config(self, service_type):
self._cbinit_conf.set_conf_value(
name="user_password_length",
value="3")


class PacketRecipe(CloudbaseinitRecipe):

config_group = util.PACKET_SERVICE

def prepare_cbinit_config(self, service_type):
super(PacketRecipe, self).prepare_cbinit_config(
service_type)
self._cbinit_unattend_conf.set_conf_value(
name='https_allow_insecure', value='True', section="packet")
self._cbinit_unattend_conf.set_conf_value(
name="plugins",
value='cloudbaseinit.plugins.common.mtu.MTUPlugin,cloudbaseinit.'
'plugins.windows.extendvolumes.ExtendVolumesPlugin')

self._cbinit_conf.set_conf_value(
name="activate_windows", value="False")
self._cbinit_conf.set_conf_value(
name="https_allow_insecure", value="True", section="packet")
self._cbinit_conf.set_conf_value(
name="netbios_host_name_compatibility", value="False")
self._cbinit_conf.append_conf_value(
name="metadata_report_provisioning_completed", value="True")
self._cbinit_conf.set_conf_value(
name="plugins",
value='cloudbaseinit.plugins.windows.extendvolumes.'
'ExtendVolumesPlugin,'
'cloudbaseinit.plugins.common.mtu.MTUPlugin,'
'cloudbaseinit.plugins.windows.ntpclient.NTPClientPlugin,'
'cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin,'
'cloudbaseinit.plugins.common.localscripts.'
'LocalScriptsPlugin,'
'cloudbaseinit.plugins.windows.createuser.CreateUserPlugin,'
'cloudbaseinit.plugins.windows.licensing.'
'WindowsLicensingPlugin,'
'cloudbaseinit.plugins.common.userdata.UserDataPlugin')
1 change: 1 addition & 0 deletions argus/util.py
Expand Up @@ -60,6 +60,7 @@
CLOUD_STACK_SERVICE = 'cloudstack'
MAAS_SERVICE = 'maas'
NO_SERVICE = 'noservice'
PACKET_SERVICE = 'packet'

DEFAULT_METADATA_URL = {
HTTP_SERVICE: "http://169.254.169.254/",
Expand Down
7 changes: 7 additions & 0 deletions ci/tests.py
Expand Up @@ -265,3 +265,10 @@ class ScenarioNoService(BaseWindowsScenario):
test_classes = (smoke.TestNoError,)
recipe_type = recipe.CloudbaseinitRecipe
service_type = util.NO_SERVICE


class ScenarioPacket(BaseWindowsScenario):

test_classes = (smoke.TestNoError, )
service_type = util.PACKET_SERVICE
recipe_type = recipe.PacketRecipe

0 comments on commit 00b5e99

Please sign in to comment.