| Author |
Message |
Peter Steele
Guest
|
Posted:
Tue Dec 28, 2004 11:33 pm Post subject:
How do I translate this cluster command to code? |
|
|
I can use the cluster command to query the value of private properties
associated with resources. For example:
cluster mycluster resource vip /priv:Address
can be used to display the address assigned to the IP Address resource
"VIP". I'd like to do the same thing in code and have been playing around
with various cluster functions but haven't been able to put together what's
needed. Can anyone explain how to do this in code? |
|
| Back to top |
|
 |
Scott Schnoll [MSFT]
Guest
|
Posted:
Tue Dec 28, 2004 11:39 pm Post subject:
Re: How do I translate this cluster command to code? |
|
|
Hi Peter,
Have you looked at the Server Cluster APIs? See
http://msdn.microsoft.com/library/en-us/mscs/mscs/server_cluster_apis_start_page.asp
for the start page for this. Hope this helps.
--
Scott Schnoll
This posting is provided "AS IS" with no warranties, and confers no
rights. Please do not send email directly to this alias. This alias is for
newsgroup
purposes only.
"Peter Steele" <psteele@z-force.com> wrote in message
news:eSdo9MQ7EHA.4072@TK2MSFTNGP10.phx.gbl...
| Quote: | I can use the cluster command to query the value of private properties
associated with resources. For example:
cluster mycluster resource vip /priv:Address
can be used to display the address assigned to the IP Address resource
"VIP". I'd like to do the same thing in code and have been playing around
with various cluster functions but haven't been able to put together
what's needed. Can anyone explain how to do this in code?
|
|
|
| Back to top |
|
 |
Shon Shah [MSFT]
Guest
|
Posted:
Wed Dec 29, 2004 12:47 am Post subject:
Re: How do I translate this cluster command to code? |
|
|
Peter,
Check out following page from MSDN
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mscs/mscs/using_the_inline_examples.asp
It has a link to "Index of Examples" and ClusDocEx_ResGetRWPProperties
example should be a good starting point for what you want to achieve. The
same page also has a link to ClusDocEx.h which must be available for any
code example to compile.
Having said that, have you considered programming with Cluster Automation
Server? It is a great and easy to use way to quickly write scripts to
programmatically perform the tasks like the one you mentioned. Please check
out
http://msdn.microsoft.com/library/en-us/mscs/mscs/programming_with_cluster_automation_server.asp?frame=true
Hope this helps.
--
Regards,
Shon Shah
Software Design Engineer/Test
Microsoft Cluster Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples, if any, are subject to the terms specified
at http://www.microsoft.com/info/cpyright.htm
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
"Peter Steele" <psteele@z-force.com> wrote in message
news:eSdo9MQ7EHA.4072@TK2MSFTNGP10.phx.gbl...
| Quote: | I can use the cluster command to query the value of private properties
associated with resources. For example:
cluster mycluster resource vip /priv:Address
can be used to display the address assigned to the IP Address resource
"VIP". I'd like to do the same thing in code and have been playing around
with various cluster functions but haven't been able to put together
what's needed. Can anyone explain how to do this in code?
|
|
|
| Back to top |
|
 |
Peter Steele
Guest
|
Posted:
Wed Dec 29, 2004 1:01 am Post subject:
Re: How do I translate this cluster command to code? |
|
|
Well, of course I did look at these. That's what I meant in my original
message. I've figured it out though. Start with ClusterResourceControl using
the code CLUSCTL_RESOURCE_GET_PRIVATE_PROPERTIES, followed by
a call to ResUtilFindSzProperty (which is in fact in a different library).
These two functions accomplish what I need.
Peter
"Scott Schnoll [MSFT]" <scschnol@online.microsoft.com> wrote in message
news:OKM9zQQ7EHA.3616@TK2MSFTNGP11.phx.gbl...
| Quote: | Hi Peter,
Have you looked at the Server Cluster APIs? See
http://msdn.microsoft.com/library/en-us/mscs/mscs/server_cluster_apis_start_page.asp
for the start page for this. Hope this helps.
--
Scott Schnoll
This posting is provided "AS IS" with no warranties, and confers no
rights. Please do not send email directly to this alias. This alias is for
newsgroup
purposes only.
"Peter Steele" <psteele@z-force.com> wrote in message
news:eSdo9MQ7EHA.4072@TK2MSFTNGP10.phx.gbl...
I can use the cluster command to query the value of private properties
associated with resources. For example:
cluster mycluster resource vip /priv:Address
can be used to display the address assigned to the IP Address resource
"VIP". I'd like to do the same thing in code and have been playing around
with various cluster functions but haven't been able to put together
what's needed. Can anyone explain how to do this in code?
|
|
|
| Back to top |
|
 |
Scott Schnoll [MSFT]
Guest
|
Posted:
Wed Dec 29, 2004 1:32 am Post subject:
Re: How do I translate this cluster command to code? |
|
|
Awesome! Post back here if you need anything else.
--
Scott Schnoll
This posting is provided "AS IS" with no warranties, and confers no
rights. Please do not send email directly to this alias. This alias is for
newsgroup
purposes only.
"Peter Steele" <psteele@z-force.com> wrote in message
news:%23TxI%239Q7EHA.1292@TK2MSFTNGP10.phx.gbl...
| Quote: | Well, of course I did look at these. That's what I meant in my original
message. I've figured it out though. Start with ClusterResourceControl
using the code CLUSCTL_RESOURCE_GET_PRIVATE_PROPERTIES, followed by
a call to ResUtilFindSzProperty (which is in fact in a different library).
These two functions accomplish what I need.
Peter
"Scott Schnoll [MSFT]" <scschnol@online.microsoft.com> wrote in message
news:OKM9zQQ7EHA.3616@TK2MSFTNGP11.phx.gbl...
Hi Peter,
Have you looked at the Server Cluster APIs? See
http://msdn.microsoft.com/library/en-us/mscs/mscs/server_cluster_apis_start_page.asp
for the start page for this. Hope this helps.
--
Scott Schnoll
This posting is provided "AS IS" with no warranties, and confers no
rights. Please do not send email directly to this alias. This alias is
for newsgroup
purposes only.
"Peter Steele" <psteele@z-force.com> wrote in message
news:eSdo9MQ7EHA.4072@TK2MSFTNGP10.phx.gbl...
I can use the cluster command to query the value of private properties
associated with resources. For example:
cluster mycluster resource vip /priv:Address
can be used to display the address assigned to the IP Address resource
"VIP". I'd like to do the same thing in code and have been playing
around with various cluster functions but haven't been able to put
together what's needed. Can anyone explain how to do this in code?
|
|
|
| Back to top |
|
 |
|
|
|
|