~smoser/cloud-init/lp-1077700

« back to all changes in this revision

Viewing changes to cloud-init-cfg.py

  • Committer: Scott Moser
  • Date: 2010-02-03 23:09:48 UTC
  • Revision ID: smoser@ubuntu.com-20100203230948-hkm26maudqkiw7xw
globally remove ec2init and rename to cloudinit

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python
2
2
 
3
3
import sys
4
 
import ec2init
 
4
import cloudinit
5
5
 
6
6
def Usage(out = sys.stdout):
7
7
    out.write("Usage: %s name\n" % sys.argv[0])
16
16
    name=sys.argv[1]
17
17
    run_args=sys.argv[2:]
18
18
 
19
 
    import ec2init.CloudConfig
 
19
    import cloudinit.CloudConfig
20
20
    import os
21
21
 
22
 
    cfg_path = ec2init.cloud_config
23
 
    cfg_env_name = ec2init.cfg_env_name
 
22
    cfg_path = cloudinit.cloud_config
 
23
    cfg_env_name = cloudinit.cfg_env_name
24
24
    if os.environ.has_key(cfg_env_name):
25
25
        cfg_path = os.environ[cfg_env_name]
26
26
 
27
 
    cc = ec2init.CloudConfig.CloudConfig(cfg_path)
 
27
    cc = cloudinit.CloudConfig.CloudConfig(cfg_path)
28
28
 
29
29
    try:
30
30
        cc.handle(name,run_args)