Drop jinja2 use

We no longer use the jinja2 template file.  Drop its use and the deps.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
This commit is contained in:
Ryan Harper 2015-10-08 15:12:07 -05:00
parent 8a9b38fb7d
commit 954b1d76fc
2 changed files with 1 additions and 72 deletions

View File

@ -37,7 +37,7 @@ install_deps_amd64:
sudo apt-get install grub-efi-amd64-signed
install_deps: install_deps_$(ARCH)
sudo apt-get install python3-urwid python3-pyudev python3-netifaces python3-nose python3-flake8 python3-yaml git bzr ubuntu-cloudimage-keyring python3-jinja2 python3-coverage ovmf shim shim-signed
sudo apt-get install python3-urwid python3-pyudev python3-netifaces python3-nose python3-flake8 python3-yaml git bzr ubuntu-cloudimage-keyring python3-coverage ovmf shim shim-signed
dryrun: probert
$(MAKE) ui-view DRYRUN="--dry-run --uefi"

View File

@ -14,7 +14,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import datetime
import jinja2
import logging
import os
import subprocess
@ -62,52 +61,6 @@ network:
version: 1
config:
"""
CURTIN_STORAGE_CONFIG_TEMPLATE = """
# Autogenerated by SUbiquity: {{DATE}} UTC
reporter:
subiquity:
path: /tmp/curtin_progress_subiquity
progress: True
partitioning_commands:
builtin: curtin block-meta custom
storage:
version: 1
config:
- id: {{TARGET_DISK_NAME}}
type: disk
ptable: msdos
model: {{TARGET_DISK_MODEL}}
serial: {{TARGET_DISK_SERIAL}}
- id: {{TARGET_DISK_NAME}}1
type: partition
offset: 512MB
size: 8GB
device: {{TARGET_DISK_NAME}}
flag: boot
- id: {{TARGET_DISK_NAME}}2
type: partition
offset: 8512MB
size: 1GB
device: {{TARGET_DISK_NAME}}
- id: {{TARGET_DISK_NAME}}1_root
type: format
fstype: ext4
volume: {{TARGET_DISK_NAME}}1
- id: {{TARGET_DISK_NAME}}2_home
type: format
fstype: ext4
volume: {{TARGET_DISK_NAME}}2
- id: {{TARGET_DISK_NAME}}1_mount
type: mount
path: /
device: {{TARGET_DISK_NAME}}1_root
- id: {{TARGET_DISK_NAME}}2_mount
type: mount
path: /home
device: {{TARGET_DISK_NAME}}2_home
"""
# TODO, this should be moved to the in-target cloud-config seed so on first boot
# of the target, it reconfigures datasource_list to none for subsequent boots
@ -166,30 +119,6 @@ def curtin_write_network_actions(actions):
conf.close()
def curtin_write_storage_template(disk_name, disk_model, disk_serial):
''' write out the storage yaml template for curtin
params:
disk_name: kernel name of disk (/dev/sda)
disk_model: disk model name
disk_serial: serial of disk from probert storage output
'''
template = jinja2.Template(CURTIN_STORAGE_CONFIG_TEMPLATE,
undefined=jinja2.StrictUndefined)
ctxt = {
'DATE': str(datetime.datetime.utcnow()),
'TARGET_DISK_NAME': os.path.basename(disk_name),
'TARGET_DISK_MODEL': disk_model,
'TARGET_DISK_SERIAL': disk_serial,
}
curtin_config = template.render(ctxt)
with open(CURTIN_STORAGE_CONFIG_FILE, 'w') as conf:
conf.write(curtin_config)
conf.close()
return CURTIN_STORAGE_CONFIG_FILE
def curtin_write_preserved_actions(actions):
''' caller must use models.actions.preserve_action on
all elements of the actions'''