aboutsummaryrefslogtreecommitdiffstats
path: root/moonv4/moon_utilities/moon_utilities/misc.py
diff options
context:
space:
mode:
Diffstat (limited to 'moonv4/moon_utilities/moon_utilities/misc.py')
-rw-r--r--moonv4/moon_utilities/moon_utilities/misc.py142
1 files changed, 0 insertions, 142 deletions
diff --git a/moonv4/moon_utilities/moon_utilities/misc.py b/moonv4/moon_utilities/moon_utilities/misc.py
deleted file mode 100644
index b83523c3..00000000
--- a/moonv4/moon_utilities/moon_utilities/misc.py
+++ /dev/null
@@ -1,142 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-
-import logging
-import random
-
-LOG = logging.getLogger(__name__)
-
-
-def get_uuid_from_name(name, elements, **kwargs):
- for element in elements:
- if type(elements[element]) is dict and elements[element].get('name') == name:
- if kwargs:
- for args in kwargs:
- if elements[element].get(args) != kwargs[args]:
- return
- else:
- return element
- else:
- return element
-
-
-def get_name_from_uuid(uuid, elements, **kwargs):
- for element in elements:
- if element == uuid:
- if kwargs:
- for args in kwargs:
- if elements[element].get(args) != kwargs[args]:
- return
- else:
- return elements[element].get('name')
- else:
- return elements[element].get('name')
-
-
-def get_random_name():
- _list = (
- "windy",
- "vengeful",
- "precious",
- "vivacious",
- "quiet",
- "confused",
- "exultant",
- "impossible",
- "thick",
- "obsolete",
- "piquant",
- "fanatical",
- "tame",
- "perfect",
- "animated",
- "dark",
- "stimulating",
- "drunk",
- "depressed",
- "fumbling",
- "like",
- "undesirable",
- "spurious",
- "subsequent",
- "spiteful",
- "last",
- "stale",
- "hulking",
- "giddy",
- "minor",
- "careful",
- "possessive",
- "gullible",
- "fragile",
- "divergent",
- "ill-informed",
- "false",
- "jumpy",
- "damaged",
- "likeable",
- "volatile",
- "handsomely",
- "wet",
- "long-term",
- "pretty",
- "taboo",
- "normal",
- "magnificent",
- "nutty",
- "puzzling",
- "small",
- "kind",
- "devilish",
- "chubby",
- "paltry",
- "cultured",
- "old",
- "defective",
- "hanging",
- "innocent",
- "jagged",
- "economic",
- "good",
- "sulky",
- "real",
- "bent",
- "shut",
- "furry",
- "terrific",
- "hollow",
- "terrible",
- "mammoth",
- "pleasant",
- "scared",
- "obnoxious",
- "absorbing",
- "imported",
- "infamous",
- "grieving",
- "ill-fated",
- "mighty",
- "handy",
- "comfortable",
- "astonishing",
- "brown",
- "assorted",
- "wrong",
- "unsightly",
- "spooky",
- "delightful",
- "acid",
- "inconclusive",
- "mere",
- "careless",
- "historical",
- "flashy",
- "squealing",
- "quarrelsome",
- "empty",
- "long",
- )
- return random.choice(_list)