Revision 015f1517

b/lib/cli.py
1 1
#
2 2
#
3 3

  
4
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc.
4
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Google Inc.
5 5
#
6 6
# This program is free software; you can redistribute it and/or modify
7 7
# it under the terms of the GNU General Public License as published by
......
115 115
  "IGNORE_SIZE_OPT",
116 116
  "INCLUDEDEFAULTS_OPT",
117 117
  "INTERVAL_OPT",
118
  "INSTANCE_COMMUNICATION_OPT",
118 119
  "MAC_PREFIX_OPT",
119 120
  "MAINTAIN_NODE_HEALTH_OPT",
120 121
  "MASTER_NETDEV_OPT",
......
1686 1687
                                     help="Hotplug devices in case"
1687 1688
                                          " hotplug is supported")
1688 1689

  
1690
INSTANCE_COMMUNICATION_OPT = \
1691
    cli_option("-c", "--communication",
1692
               default=False,
1693
               dest="instance_communication",
1694
               help=constants.INSTANCE_COMMUNICATION_DOC,
1695
               type="bool")
1696

  
1689 1697
#: Options provided by all commands
1690 1698
COMMON_OPTS = [DEBUG_OPT, REASON_OPT]
1691 1699

  
......
2727 2735
    no_install = opts.no_install
2728 2736
    identify_defaults = False
2729 2737
    compress = constants.IEC_NONE
2738
    instance_communication = opts.instance_communication
2730 2739
  elif mode == constants.INSTANCE_IMPORT:
2731 2740
    start = False
2732 2741
    os_type = None
......
2736 2745
    no_install = None
2737 2746
    identify_defaults = opts.identify_defaults
2738 2747
    compress = opts.compress
2748
    instance_communication = False
2739 2749
  else:
2740 2750
    raise errors.ProgrammerError("Invalid creation mode %s" % mode)
2741 2751

  
......
2765 2775
                                tags=tags,
2766 2776
                                no_install=no_install,
2767 2777
                                identify_defaults=identify_defaults,
2768
                                ignore_ipolicy=opts.ignore_ipolicy)
2778
                                ignore_ipolicy=opts.ignore_ipolicy,
2779
                                instance_communication=instance_communication)
2769 2780

  
2770 2781
  SubmitOrSend(op, opts)
2771 2782
  return 0
b/lib/client/gnt_instance.py
1 1
#
2 2
#
3 3

  
4
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google Inc.
4
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014 Google Inc.
5 5
#
6 6
# This program is free software; you can redistribute it and/or modify
7 7
# it under the terms of the GNU General Public License as published by
......
1479 1479
  FORCE_VARIANT_OPT,
1480 1480
  NO_INSTALL_OPT,
1481 1481
  IGNORE_IPOLICY_OPT,
1482
  INSTANCE_COMMUNICATION_OPT,
1482 1483
  ]
1483 1484

  
1484 1485
commands = {
b/src/Ganeti/Constants.hs
16 16

  
17 17
{-
18 18

  
19
Copyright (C) 2013 Google Inc.
19
Copyright (C) 2013, 2014 Google Inc.
20 20

  
21 21
This program is free software; you can redistribute it and/or modify
22 22
it under the terms of the GNU General Public License as published by
......
4764 4764

  
4765 4765
-- * Instance communication
4766 4766

  
4767
instanceCommunicationDoc :: String
4768
instanceCommunicationDoc =
4769
  "Enable or disable the communication mechanism for an instance"
4770

  
4767 4771
instanceCommunicationNetwork :: String
4768 4772
instanceCommunicationNetwork = "ganeti:network:communication"
4769 4773

  
b/src/Ganeti/OpCodes.hs
7 7

  
8 8
{-
9 9

  
10
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
10
Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Google Inc.
11 11

  
12 12
This program is free software; you can redistribute it and/or modify
13 13
it under the terms of the GNU General Public License as published by
......
452 452
     , pBackupCompress
453 453
     , pStartInstance
454 454
     , pInstTags
455
     , pInstanceCommunication
455 456
     ],
456 457
     "instance_name")
457 458
  , ("OpInstanceMultiAlloc",
b/src/Ganeti/OpParams.hs
12 12

  
13 13
{-
14 14

  
15
Copyright (C) 2012 Google Inc.
15
Copyright (C) 2012, 2014 Google Inc.
16 16

  
17 17
This program is free software; you can redistribute it and/or modify
18 18
it under the terms of the GNU General Public License as published by
......
44 44
  , SetParamsMods(..)
45 45
  , ExportTarget(..)
46 46
  , pInstanceName
47
  , pInstanceCommunication
47 48
  , pInstanceUuid
48 49
  , pInstances
49 50
  , pName
......
985 986
  withDoc "A required instance name (for single-instance LUs)" $
986 987
  simpleField "instance_name" [t| String |]
987 988

  
989
pInstanceCommunication :: Field
990
pInstanceCommunication =
991
  withDoc C.instanceCommunicationDoc $
992
  defaultFalse "instance_communication"
993

  
988 994
pForceVariant :: Field
989 995
pForceVariant =
990 996
  withDoc "Whether to force an unknown OS variant" $
b/test/hs/Test/Ganeti/OpCodes.hs
241 241
          genMaybe genNodeNameNE <*> return Nothing <*> genMaybe (pure []) <*>
242 242
          genMaybe genNodeNameNE <*> arbitrary <*> genMaybe genNodeNameNE <*>
243 243
          return Nothing <*> genMaybe genNodeNameNE <*> genMaybe genNameNE <*>
244
          arbitrary <*> arbitrary <*> (genTags >>= mapM mkNonEmpty)
244
          arbitrary <*> arbitrary <*> (genTags >>= mapM mkNonEmpty) <*>
245
          arbitrary
245 246
      "OP_INSTANCE_MULTI_ALLOC" ->
246 247
        OpCodes.OpInstanceMultiAlloc <$> arbitrary <*> genMaybe genNameNE <*>
247 248
        pure []

Also available in: Unified diff