summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRadek Novacek <rnovacek@redhat.com>2012-08-02 14:22:05 +0200
committerRadek Novacek <rnovacek@redhat.com>2012-08-02 14:22:05 +0200
commit6cd9cc0e29fea8e1aa012ecade8cfffd4f60299d (patch)
treecac9e52b4196bb5eb4936d948381947c4fd80016
parent769cb9d6f681760981f5f17d679e3c93585e53ac (diff)
downloadopenlmi-providers-0.0.1.tar.gz
openlmi-providers-0.0.1.tar.xz
openlmi-providers-0.0.1.zip
Fix wrong PG_Provider name in reg2pegasus.py0.0.1
-rw-r--r--reg2pegasus.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/reg2pegasus.py b/reg2pegasus.py
index 08f8662..8f77434 100644
--- a/reg2pegasus.py
+++ b/reg2pegasus.py
@@ -4,7 +4,7 @@ import sys
import re
reg_parse = re.compile(r"\[([^\]]+)\]\s+"
-"provider: (\w+)\s+"
+"provider: ([^\s]+)\s+"
"location: (\w+)\s+"
"type: ([^\n]+)\s+"
"namespace: ([^\n]+)")
@@ -38,17 +38,17 @@ def getTypes(types):
l.append(value)
return ",".join(l)
-def define_capability(location, cls, types):
+def define_capability(location, provider, cls, types):
return """instance of PG_Provider
{
- Name = "%(class)s";
+ Name = "%(provider)s";
ProviderModuleName = "%(location)s";
};
instance of PG_ProviderCapabilities
{
ProviderModuleName = "%(location)s";
- ProviderName = "%(class)s";
+ ProviderName = "%(provider)s";
CapabilityID = "%(class)s";
ClassName = "%(class)s";
Namespaces = { "root/cimv2" };
@@ -56,7 +56,7 @@ instance of PG_ProviderCapabilities
SupportedProperties = NULL;
SupportedMethods = NULL;
};
-""" % { 'location': location, 'class': cls, 'types': getTypes(types) }
+""" % { 'location': location, 'provider': provider, 'class': cls, 'types': getTypes(types) }
modules_defined = {}
for record in reg_parse.findall(sys.stdin.read()):
@@ -66,4 +66,4 @@ for record in reg_parse.findall(sys.stdin.read()):
print define_module(location)
modules_defined[location] = True
- print define_capability(location, cls, types)
+ print define_capability(location, provider, cls, types)