summaryrefslogtreecommitdiffstats
path: root/mcp/patches/0016-Set-boot-source-selections.patch
blob: 73bdc90e9d50dbb257fcb523c4f6e83ba82e2bf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Copyright (c) 2018 Mirantis Inc., Enea AB and others.
:
: All rights reserved. This program and the accompanying materials
: are made available under the terms of the Apache License, Version 2.0
: which accompanies this distribution, and is available at
: http://www.apache.org/licenses/LICENSE-2.0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
From: Michael Polenchuk <mpolenchuk@mirantis.com>
Date: Thu, 26 Apr 2018 16:29:02 +0400
Subject: [PATCH] Set boot source selections

Change-Id: I8dc738b3e6e6f1bfcc1348873f162651aff8bbdf

diff --git a/maas/region.sls b/maas/region.sls
index 39844bd..e231795 100644
--- a/maas/region.sls
+++ b/maas/region.sls
@@ -171,6 +171,12 @@ maas_login_admin:
   cmd.run:
   - name: "maas-region apikey --username {{ region.admin.username }} > /var/lib/maas/.maas_credentials"

+boot_source_selections:
+  cmd.run:
+  - name: "maas login {{ region.admin.username }} http://{{ region.bind.host }}:5240/MAAS/api/2.0 - < /var/lib/maas/.maas_credentials && maas opnfv boot-source-selections create 1 os='ubuntu' release='{{ region.maas_config.default_distro_series }}' arches='{{ pillar._param.opnfv_maas_node01_architecture.split('/')[0] }}' subarches='*' labels='*'"
+  - require:
+    - cmd: maas_login_admin
+
 maas_force_artifact_sync:
   cmd.script:
   - name: salt://maas/files/maas-artifact-sync.sh